import request from '@/utils/request'


export default {


    //展示前八个课程
    getCourseList() {

        return request({

            url: `/eduservice/edu-course/showCourse`,
            method: "get"

        })

    },

    //查询课程分页
    getCoursePage(pageQuery) {

        return request({

            url: `/eduservice/edu-course/getCoursePage`,
            method: "post",
            data: pageQuery
        })

    },

    //查询课程分类
    getSubjectList() {
        return request({
            url: `/eduservice/edusubject/getSubjectTree`,
            method: "get",
        })
    },

    //查询课程详情byid
    getCourseInfoById(id) {

        return request({

            url: `/eduservice/edu-course/getCourseById?id=${id}`,
            method: "get"
        })
    },

    //根据课程id查询章节小节
    getChapterByCourseId(courseId) {

        return request({
            url: `/eduservice/edu-chapter/getChapterListByCourseId?courseId=${courseId}`,
            method: "get"
        })
    },


    //添加评论
    addComment(comment){

        return request({

            url:`/eduservice/edu-comment/saveComment`,
            method:"post",
            data:comment
        })
    },
    //查询评论分页
    getCommentPage(pageQuery){

        return request({
            url:`/eduservice/edu-comment/getPageList`,
            method:"post",
            data:pageQuery
        })
    },






}